package thread.demo.arrayBlockingQueue;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;

public class ArrayBlockingQueueTest002 {
  public static void main(String[] args) throws InterruptedException {
    ArrayBlockingQueue<Integer> queue = new ArrayBlockingQueue<>(2);
    System.out.println(queue.offer(1));
    System.out.println(queue.offer(2));
    
    System.out.println(queue.offer(3));
    System.out.println(queue.offer(4, 10 , TimeUnit.SECONDS));
  }
}
